    <?php $this->load->view('user/user_head');?>
    <script type="text/javascript" src="<?php echo base_url();?>js/common.js"></script>
    
    <script type="text/javascript">
	<!--
	$(function() {

		var i_flag = $.trim($('#i_flag_hidden').val());
		var i_category = $.trim($('#i_category').val());
		if(i_flag != "") {
			$('.a_radio').each(function() {
				$(this).attr('checked', '');
				if ($(this).val() == i_flag) {
					$(this).attr('checked', 'checked');
				}
			});
		}

		if (i_category == "") {
			$('#i_category_span').text("请选择");
		} else {
			$('#i_category_span').text(get_guest_category_by_id(i_category));
		}
		
		$('#i_category_div_info span').click(function() {
			$('#i_category_span').text($(this).text());
			
			$('#i_category').val(this.title);
			tb_remove();
		});

		$('.my_button').click(function() {
			if (this.title == "save_to_list") {
				$('#hidden_action').val('l');
			}
			
			if (this.title == "save") {
				$('#hidden_action').val('s');
			}
		});
	});
	//-->
	</script>
    <link href="<?php echo base_url();?>js/thickbox/thickbox.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="<?php echo base_url();?>js/thickbox/thickbox.js"></script>
    
    <input type="hidden" id="page_code" value="5"/>
    <!-- begin: main content area #main -->
     <div id="main">
      <!-- begin: #col1 - first float column -->
      <div id="col1" role="complementary">
        <?php $this->load->view('user/guest_left_nav.php')?>
      </div>
      <!-- end: #col1 -->
      <!-- begin: #col3 static column -->
      <div id="col3" role="main">
        <div id="col3_content" class="clearfix">
           <div class="sys_help_msg_box" style="height:100px;margin-bottom:10px;">
	        	<p style="margin:20px 10px 0 20px;"><strong style="color:#d02200">温馨提示:</strong>
	        	邀请来宾管理、可以提醒您及时联系各位来宾、确保亲朋好友参加您的婚宴！
				还可以通过此项功能、预测礼金哦、预算一下大家能够给你随多少银两；等婚礼结束后与礼金管理配合使用看看哪位仁兄尚未到场！此项功能
				还可以与婚礼预算配合使用，用于预算婚礼的收支平衡!
	        	</p>
            </div>
           <?php echo isset($msg) ? $msg : ""; ?>
           <div class="my_box">
            <p class="box_title"><span>编辑·邀请来宾</span></p>
          	<form action="<?php echo base_url();?>index.php/user/GuestAction/edit" method="post">
          		<input type="hidden" id="hidden_action" name="action"/>
	            <div style="color:red;margin:20px;"><?php echo validation_errors(); ?></div>  	
	          	<ul class="userInfo" style="margin-top:20px">
	          		
	          		<li>
	          			<span class="label">*姓名:</span>
		         		<input type="text" name="i_name" size="10" value="<?php echo  isset($guest) ? $guest['i_name'] : '' ; ?>"/> 
		         		<span class="moreInfo">邀请人姓名必须填写 、最多输入5个字符</span>		
	         		</li>
	         		
	          		<li>
	          			<span class="label">电话：</span>
		         		<input type="text" name="phone" size="15" value="<?php echo   isset($guest) ? $guest['phone'] : ''; ?>"/>
		         		<span class="moreInfo">电话最多输入20个字符</span>		
	         		</li>
	         		
	         		<li>
	         			<span class="label">邀请状态：</span>
		         		未邀请<input class="a_radio" style="width:10px;" type="radio" name="i_flag" checked="checked" value="0"/>
	          			已邀请<input class="a_radio" style="width:10px;" type="radio" name="i_flag" value="1"/>
		         		<span class="moreInfo">选择该状态、确保所有来宾都能参加婚礼</span>		
	         		</li>
	         		
	         		<li>
	         			<span class="label">来宾类型：</span>
		         		<span id="i_category_span">未选择</span>
		         		<a href="#TB_inline?height=200&width=280&inlineId=i_category_div" class="thickbox">【选择来宾类型】</a>
	         		</li>
	         		
	         		<li>
	         			<span class="label">预测礼金：</span>
						<input type="text" name="money" size="15" value="<?php echo   isset($guest) ? $guest['money'] : ''; ?>"/>
		         		<span class="moreInfo">预测一下这位来宾能随礼多少银两(*^__^*) (该项只能是数字)</span>		
	         		</li>
	         		
	         		<li>
	         			<span class="label">备注：</span>
		         		<input type="text" size="45" name="remark" value="<?php echo isset($guest) ? $guest['remark'] : ''; ?>"/> 
		         		<span class="moreInfo">备注信息、最多不能超过50个字符</span>		
		         		
	         		</li>
	          	</ul>
	          	<input type="hidden" id="i_flag_hidden"  value="<?php echo  set_value('i_flag', isset($guest) ? $guest['i_flag'] : ''); ?>"/>
	          	<input type="hidden" id="id" name="id" value="<?php echo  isset($guest) ? $guest['id'] : ''; ?>"/>
	          	<input type="hidden" name="i_category" id="i_category" value="<?php echo  isset($guest) ? $guest['i_category'] : ''; ?>"/>
	          	<p style="margin:20px"><?php echo $button?>&nbsp;&nbsp;&nbsp;&nbsp; <a href="<?php echo base_url()?>index.php/user/guestAction/index">【返回列表】 </a></p>
          	</form>
          </div>
        </div>
        <div id="ie_clearing">&nbsp;</div>
        <!-- End: IE Column Clearing -->
      </div>
      <!-- end: #col3 -->
    </div>
    <div id="i_category_div" style="display:none">
    	<div id="i_category_div_info">
	    	<span title="1">新郎同学</span>
			<span title="2">新郎朋友</span>
			<span title="3">新郎同事</span>
			<br /><br />
	    	<span title="4">新娘同学</span>
			<span title="5">新娘朋友</span>
			<span title="6">新娘同事</span>
			<br /><br />
			<span title="7">娘家亲属</span>
		  	<span title="8">娘家朋友</span>
		  	<span title="9">娘家同事</span>
		  	<br /><br />
		  	<span title="10">婆家亲属</span>
		  	<span title="11">婆家朋友</span>
		  	<span title="12">婆家同事</span>
	  	</div>
    </div>
    <!-- end: #main -->
<?php $this->load->view('user/footer');?>